package com.cskaoyan.javase.oop3._1interface._4case;

/**
 * 商品类
 * @since 17:46
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Goods {
    private String name;
    private String brand;
    private double price;
    private int id;

    public Goods() {
    }

    public Goods(String name, String brand, double price,int id) {
        this.name = name;
        this.brand = brand;
        this.price = price;
        this.id = id;
    }

    public void print() {
        System.out.println("商品的id是"+id+"，它的名字是" + name + ",它的品牌是" + brand + ",它的价格是" + price);
    }

    public int getId() {
        return id;
    }
}
